﻿<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4" style="overflow: hidden;">

<head>
  <meta charset="utf-8">
  <title layout:title-pattern="$CONTENT_TITLE | $LAYOUT_TITLE">合肥哈工-仓储管理系统</title>

  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport" />
  <meta name="description" content="" />
  <!-- TODO: Add description -->
  <meta name="author" content="" />
  <!-- TODO: Add author -->

  <!-- Favicon -->
  <!--<link rel="shortcut icon" th:href="@{|${theme}/favicon.ico|}" />-->
  <link rel="icon" type="image/x - icon" href="static/wmsled/head.jpg">
  <!-- TODO: Add favicon -->

  <!-- Stylesheets -->
  <link th:href="@{|${theme}/css/bootstrap.min.css|}" href="themes/inspinia/css/bootstrap.min.css" rel="stylesheet" />
  <link th:href="@{|${theme}/font-awesome/css/font-awesome.min.css|}" href="themes/inspinia/font-awesome/css/font-awesome.min.css"
    rel="stylesheet" />
  <link th:href="@{|${theme}/css/animate.min.css|}" href="themes/inspinia/css/animate.min.css" rel="stylesheet" />
  <link th:href="@{|${theme}/css/plugins/toastr/toastr.min.css|}" rel="stylesheet">
  <!-- Gritter -->
  <link th:href="@{|${theme}/plugins/gritter/jquery.gritter.css|}" rel="stylesheet">
  <link th:href="@{|${theme}/css/style.css|}" href="themes/inspinia/css/style.css" rel="stylesheet" />
  <link rel="stylesheet" th:href="@{|${theme}/css/custom.css|}" />
  <style>
    body {
      background-color: #f8f9fa;
    }

    .nav > li > a {
      color: #000;
    }
    .nav > li.active > a {
      color: #333;
    }
    .navbar-default .nav > li > a:hover,
    .navbar-default .nav > li > a:focus {
      background-color: #e9ecef;
      color: #333;
    }

    .nav > li.active {
      background: #e9ecef;
    }

    .nav-header {
      background-color: transparent;
      background-image: none;
    }


  </style>
  <style>


    #page-wrapper {
      padding: 0 !important;
    }

    .wrapper,
    .wrapper-content {
      margin: 0 !important;
      padding: 0 !important;
    }

    .wrapper-content padding: 0 0 0 10px;
    background-color: #fff;
    }

    iframe body {
      background-color: #fff;
    }

    .search-form .form-group {
      margin-bottom: 0
    }

    .navbar-a {
      color:#fff;
    }
    .navbar-a:hover,
    .navbar-a:active {
      color:#ccc;
    }

  </style>
  <script th:inline="javascript">
    var static = /*[[@{${static}}]]*/ '';
    var theme = /*[[@{${theme}}]]*/ '';
    var rootUrl = /*[[@{/index}]]*/ '';
    rootUrl = rootUrl.replace('/index', '');
    var baseUrl = /*[[@{${baseUrl}}]]*/ '';

  </script>
</head>

<body class="fixed-nav iframe" style="overflow: hidden;">
  <div id="wrapper">
    <div th:replace="layouts/fragments/sidebar_db2 :: sidebar"></div>
    <div id="page-wrapper" class="gray-bg" style="margin-top:32px;">
      <!-- Navbar -->
      <div th:replace="layouts/fragments/navbar2 :: navbar"></div>
      
      <!--
	  <th:block layout:fragment="pageheader">
	    <div th:replace="layouts/fragments/pageheader :: pageheader"></div>
	  </th:block>
 	  -->
 	  
      <div class="wrapper wrapper-content animated fadeIn" id="outerParentFrameDiv" style="height:calc(100vh - 32px);">
        
        <!-- 
        <iframe id="content" frameborder="0" name="content" border="no" src="/dashboard" style="border: none; min-width:100%;">
        </iframe>
         -->
         <iframe src="./static/home/index.html" id="content" frameborder="-1" name="content" border="no" style="border: none; min-width:100%;">
        </iframe>
      </div>
		
      <!-- Footer -->
      <!--<div th:replace="layouts/fragments/footer :: footer"></div>-->
    </div>

    <!-- <div class="bottom-right-container">
	      <th:block th:include="layouts/fragments/debuginfo :: debuginfo" />
	    </div> -->
  </div>
  <!-- JavaScripts -->
  <!-- Mainly scripts -->
  <script th:src="@{|${theme}/js/jquery-2.1.1.js|}" src="/themes/inspinia/js/jquery-2.1.1.js"></script>
  <script th:src="@{|${theme}/js/bootstrap.min.js|}" src="/themes/inspinia/js/bootstrap.min.js"></script>
  <script th:src="@{|${theme}/plugins/metisMenu/jquery.metisMenu.js|}" src="/themes/inspinia/plugins/metisMenu/jquery.metisMenu.js"></script>
  <script th:src="@{|${theme}/plugins/slimscroll/jquery.slimscroll.min.js|}" src="/themes/inspinia/plugins/slimscroll/jquery.slimscroll.min.js"></script>
  <!-- Custom and plugin javascript -->
  <th:block th:switch="${applicationEnvironment}">
    <th:block th:case="'prod'">
      <!-- Application -->
      <script th:src="@{|${theme}/js/inspinia.min.js?v=${applicationVersion}|}" src="/themes/inspinia/js/inspinia.min.js"></script>
    </th:block>
    <th:block th:case="*">
      <script th:src="@{|${theme}/js/inspinia.min.js?v=${applicationVersion}|}" src="/themes/inspinia/js/inspinia.min.js"></script>
    </th:block>
  </th:block>
  <script type="text/javascript" th:inline="javascript">
    $(document).ready(function () {
      var prevUrl = null;
      var prefix = /*[[${subsystem!=null && subsystem.contextPath!=null?subsystem.contextPath:''}]]*/ || '';
      toHash(location.hash.replace("#", ""));
      $(window).on("hashchange", function () {
        toHash(location.hash.replace("#", ""));
      });
      $("nav.navbar-default").on("click", "li:not(.nav-header)>a", function (e) {
        var href = $(this).attr("href");
        if ("#" !== href && href.indexOf("javascript") >= 0) {
          return true;
        }

        if (href) {
          e.preventDefault();
          $(this).addClass("active");
          $(this).parent("li.active").removeClass("active");
          toUrl(href);
          return false;
        }
      });

      function toHash(hash) {
        if (hash) {
          var m = $("ul.nav").find("li a[href='" + hash + "']");
          if (m.length) {
        	  $("ul.nav li.active").removeClass("active");
        	  $("ul.nav ul.collapse").removeClass("in");
	       	  $(m).parents("li").addClass("active");
	       	  $(m).parents("ul.collapse").addClass("in");
      		  toUrl(hash, true);
          }
        }
      }

      function toUrl(href, hashchange) {
        var url = (href.indexOf('http') < 0 ? prefix.trim() : '') + href;
        if (url.indexOf('http') < 0) url = url.replace('//', '/');
        if(href !='' && href != '/' && url != prevUrl){      
	        console.log("iframe content to", url);
        	prevUrl = url;
        	$('#content').height(0);
	        $("#content").attr("src", url);
	        if(!hashchange){
	        	window.location.hash = href;
	        }
        }
      }
    });

  
  </script>
  <!-- Page JavaScripts -->
  <th:block layout:fragment="scripts" />
</body>

</html>
